from django.contrib.admin.util import help_text_for_field
from django.contrib.auth.models import User
from django.db import models
from django_countries import CountryField
from time import time

def get_uploaded_filename(instance, filename):
    return "informes_pais/%s_%s" % (str(time()).replace(".", "_") , filename)


class InformePais(models.Model):
    usuario = models.ForeignKey(User)
    pais = CountryField()
    resumen = models.TextField()
    archivo = models.FileField( upload_to = get_uploaded_filename )
    fecha_inicio = models.DateField()
    fecha_fin = models.DateField()
